#include "clickablelabel.h"

ClickableLabel::ClickableLabel(QWidget *parent) :
    QLabel(parent)
{
    map = new QMap<QString, QString>();
}

ClickableLabel::~ClickableLabel()
{
    delete map;
}

void ClickableLabel::addData(const QString &key, const QString &val)
{
    map->insert(key, val);
}

QString ClickableLabel::getData(const QString &key)
{
    return map->value(key);
}

void ClickableLabel::mouseReleaseEvent(QMouseEvent *ev)
{
    emit clicked();
    emit clicked(this);
}
